package com.ojoin.trade.supplyloan_core.web.dao.impl;

import java.util.HashMap;

import org.springframework.stereotype.Repository;

import com.ojoin.trade.common.exception.BusinessException;
import com.ojoin.trade.common.exception.DaoException;
import com.ojoin.trade.common.web.dao.impl.BaseDaoImpl;
import com.ojoin.trade.supplyloan_core.web.dao.TbSlCreditInfoDao;
import com.ojoin.trade.supplyloan_core.web.domain.TbSlCreditInfo;

/**
 * Created with IntelliJ IDEA.
 * User: Administrator
 * Date: 16-1-8
 * Time: 下午5:27
 * To change this template use File | Settings | File Templates.
 */
@Repository
public class TbSlCreditInfoDaoImpl extends BaseDaoImpl<TbSlCreditInfo> implements TbSlCreditInfoDao {

	@Override
	public void deleteCreditInfo(int joinuserid, int id_of_platform_user)
			throws BusinessException {
		String sqlName="deleteCreditInfo";
		try {
			HashMap<String, Object> paramMap = new HashMap<String, Object>();
			paramMap.put("joinuserid", joinuserid);
			paramMap.put("id_of_platform_user", id_of_platform_user);
			sqlSessionTemplate.delete(getSqlName(sqlName), paramMap);
		} catch (Exception e) {
			throw new DaoException(String.format("根据ID删除对象出错！语句：%s", getSqlName(sqlName)), e);
		}
		
	}

}
